package com.mdd.admin.controller.log;

import com.mdd.admin.service.log.IOrderRefundLogService;
import com.mdd.admin.vo.log.OrderRefundLogDetailVo;
import com.mdd.common.core.AjaxResult;
import com.mdd.common.validator.annotation.IDMust;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 订单退款日志管理
 */
@Deprecated
@RestController
@RequestMapping("api/refund/log")
public class OrderRefundLogController {

    @Resource
    IOrderRefundLogService iOrderRefundLogService;

    /**
     * 订单退款日志详情
     *
     * @param refundId 主键ID
     * @return Object
     */
    @GetMapping("/detail")
    public Object detail(@Validated @IDMust() @RequestParam("refundId") Long refundId) {
        List<OrderRefundLogDetailVo> detail = iOrderRefundLogService.detail(refundId);
        return AjaxResult.success(detail);
    }

}
